﻿<style>
    .height800 {
        max-height: 800px;
        overflow-y: auto;
    }
</style>
<div>
    <div class="form-inline pull-right">
        <button class="btn btn-info waves-effect" ng-click="list.GetPageData(paginationConf.currentPage, paginationConf.itemsPerPage);">
            <span class="glyphicon glyphicon-refresh"></span>
        </button>
        <button class="btn btn-info waves-effect" ng-click="add()">
            <span class="glyphicon glyphicon-plus"></span>
        </button>
        <div class="input-group">
            <span class="input-group-addon">全局搜索：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-change="search(kw)" ng-model="kw" placeholder="全局搜索" />
            </div>
        </div>
    </div>
    <table ng-table="list.tableParams" class="table table-bordered table-hover table-condensed listTable" ng-form="list.tableForm" tracked-table="list.tableTracker">
        <tr ng-repeat="row in $data" ng-form="rowForm" tracked-table-row="row">
            <td title="'头像'">
                <img ng-src="{{row.Avatar}}" />
            </td>
            <td title="'用户名'">
                {{row.Username}}
            </td>
            <td title="'用户邮箱'">
                {{row.Email}}
            </td>
            <td title="'昵称'">
                {{row.NickName}}
            </td>
            <td title="'是否是管理员'">
                {{row.IsAdmin}}
            </td>
            <td title="'操作'" style="width: 150px;">
                <div class="btn-group">
                    <button class="btn btn-info btn-sm waves-effect" ng-click="edit(row)">
                        <i class="icon-pencil"></i>
                    </button>
                    <button class="btn btn-danger btn-sm waves-effect" ng-click="remove(row)">
                        <i class="icon-bin"></i>
                    </button>
                    <a class="btn btn-info btn-sm waves-effect" ng-click="resetPwd(row)">
                        <i class="icon-undo2"></i>
                    </a>
                </div>
            </td>
        </tr>
    </table>
    <tm-pagination conf="paginationConf"></tm-pagination>
</div>
<div id="edit" class="modal">
    <div class="container-fluid" style="margin: 15px 0;">
        <div class="card-body bgm-white">
            <div class="form-group">
                <div class="input-group">
                    <label for="name" class="input-group-addon control-label">用户名：</label>
                    <div class="fg-line">
                        <input type="text" class="form-control" id="name" placeholder="请输入用户名" ng-model="userinfo.Username">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="input-group">
                    <label for="NickName" class="input-group-addon control-label">用户昵称：</label>
                    <div class="fg-line">
                        <input type="text" class="form-control" id="NickName" placeholder="请输入用户昵称" ng-model="userinfo.NickName">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="input-group">
                    <label for="Email" class="input-group-addon control-label">用户邮箱：</label>
                    <div class="fg-line">
                        <input type="email" class="form-control" id="Email" placeholder="请输入用户邮箱" ng-model="userinfo.Email">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-xs-12">
                    <div class="fg-line">
                        <div class="btn-group">
                            <button type="button" class="btn btn-info" ng-click="submit(userinfo)">
                                保存
                            </button>
                            <button type="button" class="btn btn-danger" ng-click="closeAll()">
                                取消
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>